home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir42
/
dfdset.zip
/
GEDPS.PS
< prev
next >
Wrap
Text File
|
1993-10-03
|
8KB
|
312 lines
%%BeginResource: procset ATK1Dict 1 7
/ATK1Dict 100 dict def % Should cut closer to Truth
ATK1Dict begin
% This is a prologue for DFD files sent to the laser printer
% NOTE: A rotation is normally done for LANDSCAPE style printing.
% If this rotation is not desired, orientation is defined to PORTRAIT.
% THE ORIENTATION CAN BE CHANGED BY CHANGING THE DEFINITION OF ORIENTATION
% AND BY FIXING THE BoundingBox COMMENT (FOR EPS COMPATIBILITY)
% For LANDSCAPE, %%BoundingBox: 0 0 612 796, is proper
% For PORTRAIT, %%BoundingBox: 0 0 612 492, is proper.
/PORTRAIT 1 def
/LANDSCAPE 0 def % Definitions
% orientation should be defined before the prologue; it defaults to LANDSCAPE
/orientation where
{
pop % pop the dictionary off of the stack
}
{
/orientation LANDSCAPE def
}
ifelse
orientation LANDSCAPE eq { % Set up based on orientation definition
90 rotate 36 -36 translate % landscape - origin in UL corner
10.0 72 mul 11000 div dup scale % scale to 11000 for 10 inches across page
20 setlinewidth % Same as 1 pixel on screen
}
{
36 440 translate % portrait - origin in UL corner of DFD
7.5 72 mul 11000 div dup scale % scale to 11000 for 7.5 inches across page
16 setlinewidth % Same as 1 pixel on screen
}
ifelse % Set up for LANDSCAPE or PORTRAIT
/Pts { 72 div 1100 mul } def % Multiplier for points to internal units
% myscale is defined before this prologue; it defaults to 11 Points
/myscale where
{
pop % pop the dictionary off of the stack
}
{
/myscale { 11 Pts } def
}
ifelse
myscale 2 mul 27 Pts gt % if the font will run off the page bottom
{
1 8000 27 Pts add 8000 myscale 2 mul add div scale
% Scale so font above page bottom. (Scales in y direction only)
}
if
% myfont is defined before this prologue; it defaults to /Helvetica
/myfont where
{
pop
}
{
/myfont /Helvetica def
}
ifelse
myfont findfont myscale scalefont setfont % 80 chars across page (now:x10)
% The x coordinate is the same as in DFDs, the Y coordinate is negative
/doProcess % Gets Pno Ptext Rad Xc Yc
{
/Yc exch def
/Xc exch def
/Rad exch def
/Ptext exch def
[ exch ] Xc Yc neg Rad add myscale 0.75 mul sub placetext % Pno is still on the stack
Ptext Xc Yc neg placetext
Xc Yc neg Rad 0 360 arc stroke
} def
/doExternal % Gets: Etext Xc Yc Xdis Ydis
{
/Ydis exch def
/Xdis exch def
/Yc exch def
/Xc exch def
Xc Yc neg placetext % Etext is still on the stack
Xc Yc neg Xdis Ydis box
} def
/doFile % Gets: Ftext Xc Yc Xdis Ydis SingDoub
{
/SingDoub exch def
/Ydis exch def
/Xdis exch def
/Yc exch def
/Xc exch def
Xc Yc neg placetext % Ftext is already on the stack
SingDoub 1 and 1 eq
{
Xc Xdis add Yc neg Ydis add moveto
Xdis neg Xdis neg add 0 rlineto
stroke newpath
} if
SingDoub 2 and 2 eq
{
Xc Xdis add Yc neg Ydis neg add moveto
Xdis neg Xdis neg add 0 rlineto
stroke newpath
} if
} def
/doControlFlow % Gets: [[X1 Y1] ... [Xm Ym]] Xn Yn Name Arrows?
{
[100 100] 50 setdash % 1/10 inch dashes, start with 1/20 inch dash
doFlow % now handle regular dash...
[] 0 setdash % return to solid line stroking
} def
/doFlow % Gets: [[X1 Y1] ... [Xm Ym]] Xn Yn Name Arrows?
{
/Doub exch def % Single or double headed:
/Ftext exch def
/Yn exch def
/Xn exch def
/RouteArray exch def
RouteArray PolyLine % Draw the path, Sans arrowheads and Text
RouteArray 0 get aload pop /Ys exch def /Xs exch def
Doub 2 and 2 eq % Arrowhead at beginning! (case 2 or 3)
{
RouteArray 1 get aload pop /Ytmp exch def /Xtmp exch def
Xs Ys neg moveto
Xs Xtmp sub Ys Ytmp sub atan arrowhead
gsave stroke grestore
newpath
}
if
Doub 1 and 1 eq % Arrowhead at end! (cases 1 and 3)
{
/tmpCount RouteArray length def
RouteArray tmpCount 1 sub get aload pop /Ye exch def /Xe exch def
RouteArray tmpCount 2 sub get aload pop /Ytmp exch def /Xtmp exch def
Xe Ye neg moveto
Xe Xtmp sub Ye Ytmp sub atan arrowhead
gsave stroke grestore
newpath
}
if
Xn Yn neg moveto
Ftext
dup BlankUnder
Xn Yn neg % Text still on stack
placetext
} def
/doDescription % Gets Dtext Xl Yl
{
neg myscale 2 div add moveto % Up 1/2 line for descriptions
0 get % Only use the first element of the array
gsave
dup stringwidth pop 2 div 0 rmoveto
dup [ exch ] BlankUnder
grestore
0 myscale 2 div neg rmoveto % Move back 1/2 line.
show
} def
%
%% Other functions
%
/placetext % stack: text xcenter ycenter
{
/Ypc exch def /Xpc exch def
/Array exch def
/ArrayLen Array length def
/Ypc ArrayLen 2 div myscale mul neg Ypc add def
Xpc Ypc moveto % Absolute move to center top of new text
Array aload pop % Push all the strings on the stack
0 1 ArrayLen 1 sub
{
myscale mul Ypc add % Calculate the new Y center
Xpc exch moveto % Move to the new text center
dup stringwidth pop % puts x width on stack after copy of string
2 div neg % puts -1/2 x on stack
0 % puts 0 y-char height on stack
rmoveto % move halfway
show % Only string was on stack now
}
for
newpath % Clear any current path from the moveto
} def
/placeDate % Gets dateString x y
{
gsave % just to save the font
moveto % leaves dateString on the stack
myfont findfont
myscale 2 div % Half the regular font size
dup 18 Pts gt
{ pop 18 Pts } if % But never greater than 18 Pts
dup 5 Pts lt
{ pop 5 Pts } if % And never less than 5 Pts
scalefont
setfont
show
grestore
} def
/box % items on stack: xcenter ycenter xdis ydis: For externals
{ /ydis exch def
/xdis exch def
/ycenter exch def
/xcenter exch def
newpath
xcenter xdis add ycenter ydis add moveto
0 ydis neg ydis neg add rlineto
xdis neg xdis neg add 0 rlineto
0 ydis ydis add rlineto
closepath stroke
} def
/average % Gets: Two numbers to average
{
add 2 div
} def
/arrowhead % Gets: angle as input
{
gsave % Save current origin & rotation
currentpoint % Get the current position
translate % Make it the origin
rotate % Use the angle argument
triangle % Draw the triangle
grestore % Restore origin and rotation
} def
/triangle % Draws a dull, black triangle at the origin
{
gsave % Preserve our dullness (gray scale)
0 setgray
0 0 moveto
50 100 lineto
-100 0 rlineto
closepath
fill
grestore % Restore our dullness
} def
/PolyLine % Array of 2-int arrays on stack
{
/Array exch def
Array 0 get aload pop /Ys exch def /Xs exch def
Xs Ys neg moveto
1 1 Array length 1 sub
{
Array exch get aload pop /Ye exch def /Xe exch def
Xe Ye neg lineto
/Xs Xe def
/Ys Ye def
}
for
gsave stroke grestore
newpath
} def
% Note: This is font specific. For Helvetica, the Font Box
% descends 22% below point size and extends above 94% point size
/BlankUnder % text-item array
{
aload length /ArrayLen exch def
currentpoint /Ytmp exch def /Xtmp exch def
Xtmp Ytmp ArrayLen 2 div myscale mul neg add
moveto
currentpoint /Ytmp exch def /Xtmp exch def
0 1 ArrayLen 1 sub
{
myscale mul Ytmp add Xtmp exch moveto
stringwidth pop % How wide is it
dup 0 gt
{ % If width is > 0
dup 2 div neg % Half of the string width wide
myscale rmoveto % Move to -1/2 stringwidth, myscale
dup 0 rlineto % Move to 1/2 stringwidth, myscale
0 myscale 1.25 mul neg rlineto % Move to 1/2 stringwidth, -.25 myscale
neg 0 rlineto % Move to -1/2 stringwidth, -.25 myscale
%myscale 1.2 mul rmoveto % And 1.2 char height high
%dup 0 rlineto 0 myscale 1.2 mul 1.2 mul neg rlineto
%neg 0 rlineto
closepath
gsave % Save current gray level
1 setgray fill
grestore newpath % Reset the gray level
}
{ % width is 0
pop % pop off extra stringwidth
}
ifelse
} for
} def
end % End of ATK1Dict: Do begin when needed.
%%EndResource
%%EndProlog